Apparatus and method of low complexity optimization solver for path smoothing with constraint variation

ABSTRACT

An apparatus and method of low complexity optimization solver for path smoothing with constraint variation are herein disclosed. According to one embodiment, an apparatus includes an L1 central processing unit (CPU) configured to transform an L1 trend filtering problem to a primal-dual linear programming (LP) optimization problem pair; and an L1 arithmetic logic unit (ALU) connected to the L1 CPU and configured to solve a primal problem of the primal-dual LP optimization problem pair.

PRIORITY

This application is a continuation of U.S. patent application Ser. No. 16/742,231, which was filed in the United States Patent and Trademark Office (USPTO) on Jan. 14, 2020, which is a continuation of U.S. patent application Ser. No. 16/016,256, which was filed in the USPTO on Jun. 22, 2018, issued as U.S. Pat. No. 10,534,837 on Jan. 14, 2020, and claims priority under 35 U.S.C. § 119(e) to U.S. Provisional Patent Application Ser. No. 62/585,187, which was filed in the USPTO on Nov. 13, 2017, the entire content of each of which is incorporated herein by reference.

FIELD

The present disclosure relates generally to an optimization solver, and more particularly, to an apparatus and a method of low complexity optimization solver for path smoothing with constraint variation.

BACKGROUND

Path optimization (also known as trend filtering) aims at finding an optimal path based on a raw path, which minimizes a cost as a function of both the raw path and the optimal path to be computed. Path optimization has wide application, including robotics, aviation, and finance. For example, path optimization may be used to smooth a shaking raw camera path for video stabilization.

Linear programming (LP) is a mathematical technique for maximizing or minimizing a linear function of several variables, such as output or cost. Quadratic programming (QP) is a process of solving a special type of mathematical optimization problem-specifically, a (linear constrained) quadratic optimization problem, that is, the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

SUMMARY

According to one embodiment, an apparatus is provided. The apparatus includes an L1 central processing unit (CPU) configured to transform an L1 trend filtering problem to a primal-dual linear programming (LP) optimization problem pair; and an L1 arithmetic logic unit (ALU) connected to the L1 CPU and configured to solve a primal problem of the primal-dual LP optimization problem pair.

According to one embodiment, a method is provided. The method includes transforming, by an L1 central processing unit (CPU), an L1 trend filtering problem to a primal-dual linear programming (LP) optimization problem pair; and solving, by an L1 arithmetic logic unit (ALU) connected to the L1 CPU, a primal problem of the primal-dual LP optimization problem pair.

According to one embodiment, an apparatus is provided. The apparatus includes an L2 central processing unit (CPU) configured to derive a quadratic programming (QP) problem through dual transformation; and an L2 arithmetic logic unit (ALU) connected to the L2 CPU and configured to solve the QP problem using an alternating direction method of multipliers (ADMM) based solution.

According to one embodiment, a method is provided. The method includes deriving, by an L2 central processing unit (CPU), a quadratic programming (QP) problem through dual transformation; and solving, by an L2 arithmetic logic unit (ALU) connected to the L2 CPU, the QP problem using an alternating direction method of multipliers (ADMM) based solution.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certain embodiments of the present disclosure will be more apparent from the following detailed description, taken in conjunction with the accompanying drawings, in which:

FIG. 1 illustrates a block diagram of a gyroscope-based three-dimensional (3D) video stabilization system, according to one embodiment;

FIG. 2 illustrates an apparatus for an L1 path optimizer, according to one embodiment;

FIG. 3 illustrates a flowchart of a method of an extended full tableau simplex based LP solver, according to one embodiment;

FIG. 4 illustrates a flowchart of a method of an L1 ALU, according to an embodiment;

FIG. 5 illustrates an L2 path optimizer, according to one embodiment;

FIG. 6 illustrates a flowchart of a method of an ADMM based QP solver, according to one embodiment;

FIG. 7 illustrates a flowchart of a method of an L2 ALU, according to one embodiment;

FIG. 8 illustrates a block diagram of an electronic device in a network environment, according to one embodiment; and

FIG. 9 illustrates a block diagram of a camera module, according to one embodiment.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE PRESENT DISCLOSURE

Hereinafter, embodiments of the present disclosure are described in detail with reference to the accompanying drawings. It should be noted that the same elements will be designated by the same reference numerals although they are shown in different drawings. In the following description, specific details such as detailed configurations and components are merely provided to assist with the overall understanding of the embodiments of the present disclosure. Therefore, it should be apparent to those skilled in the art that various changes and modifications of the embodiments described herein may be made without departing from the scope of the present disclosure. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms described below are terms defined in consideration of the functions in the present disclosure, and may be different according to users, intentions of the users, or customs. Therefore, the definitions of the terms should be determined based on the contents throughout this specification.

The present disclosure may have various modifications and various embodiments, among which embodiments are described below in detail with reference to the accompanying drawings. However, it should be understood that the present disclosure is not limited to the embodiments, but includes all modifications, equivalents, and alternatives within the scope of the present disclosure.

Although the terms including an ordinal number such as first, second, etc. may be used for describing various elements, the structural elements are not restricted by the terms. The terms are only used to distinguish one element from another element. For example, without departing from the scope of the present disclosure, a first structural element may be referred to as a second structural element. Similarly, the second structural element may also be referred to as the first structural element. As used herein, the term “and/or” includes any and all combinations of one or more associated items.

The terms used herein are merely used to describe various embodiments of the present disclosure but are not intended to limit the present disclosure. Singular forms are intended to include plural forms unless the context clearly indicates otherwise. In the present disclosure, it should be understood that the terms “include” or “have” indicate existence of a feature, a number, a step, an operation, a structural element, parts, or a combination thereof, and do not exclude the existence or probability of the addition of one or more other features, numerals, steps, operations, structural elements, parts, or combinations thereof.

Unless defined differently, all terms used herein have the same meanings as those understood by a person skilled in the art to which the present disclosure belongs. Terms such as those defined in a generally used dictionary are to be interpreted to have the same meanings as the contextual meanings in the relevant field of art, and are not to be interpreted to have ideal or excessively formal meanings unless clearly defined in the present disclosure.

The electronic device according to one embodiment may be one of various types of electronic devices. The electronic devices may include, for example, a portable communication device (e.g., a smart phone), a computer, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. According to one embodiment of the disclosure, an electronic device is not limited to those described above.

The terms used in the present disclosure are not intended to limit the present disclosure but are intended to include various changes, equivalents, or replacements for a corresponding embodiment. With regard to the descriptions of the accompanying drawings, similar reference numerals may be used to refer to similar or related elements. A singular form of a noun corresponding to an item may include one or more of the things, unless the relevant context clearly indicates otherwise. As used herein, each of such phrases as “A or B,” “at least one of A and B,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least one of A, B, or C,” may include all possible combinations of the items enumerated together in a corresponding one of the phrases. As used herein, terms such as “1^(st),” “2nd,” “first,” and “second” may be used to distinguish a corresponding component from another component, but are not intended to limit the components in other aspects (e.g., importance or order). It is intended that if an element (e.g., a first element) is referred to, with or without the term “operatively” or “communicatively”, as “coupled with,” “coupled to,” “connected with,” or “connected to” another element (e.g., a second element), it indicates that the element may be coupled with the other element directly (e.g., wiredly), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented in hardware, software, or firmware, and may interchangeably be used with other terms, for example, “logic,” “logic block,” “part,” and “circuitry.” A module may be a single integral component, or a minimum unit or part thereof, adapted to perform one or more functions. For example, according to one embodiment, a module may be implemented in a form of an application-specific integrated circuit (ASIC). According to one embodiment, a method of the disclosure may be included and provided in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read only memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded) online via an application store (e.g., Play Store™), or between two user devices (e.g., smart phones) directly. If distributed online, at least part of the computer program product may be temporarily generated or at least temporarily stored in the machine-readable storage medium, such as memory of the manufacturer's server, a server of the application store, or a relay server.

According to one embodiment, each component (e.g., a module or a program) of the above-described components may include a single entity or multiple entities. According to one embodiment, one or more of the above-described components may be omitted, or one or more other components may be added. Alternatively or additionally, a plurality of components (e.g., modules or programs) may be integrated into a single component. In this case, the integrated component may still perform one or more functions of each of the plurality of components in the same or similar manner as they are performed by a corresponding one of the plurality of components before the integration. Operations performed by the module, the program, or another component may be carried out sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be executed in a different order or omitted, or one or more other operations may be added.

In an embodiment, a low complexity solver is described below for path optimization using an L1 norm. A norm is a function that assigns a strictly positive length or size to each vector in a vector space, except the zero vector, which is assigned a length of zero. L1 represents a formulation based on L1 norm cost and L2 represents a formulation based on L2 norm cost. The L1 norm cost measures a sum of absolute differences between a target value and estimated values. A solver that uses the L1 norm cost (L1 solver) uses a special structure of path optimization and achieves significant complexity reduction as compared with using a standard LP solver.

In an embodiment, a low complexity solver is described below for path optimization using an L2 norm. The L2 norm cost measures a sum of a square of differences between a target value and estimated values. A solver that uses the L2 norm cost (L2 solver) uses a special structure of path optimization and achieves significant complexity reduction as compared with using a standard QP solver.

In an embodiment, a solver may be used to smooth a shaking raw camera path for video stabilization. For real-time implementation, an efficient solver with low computational cost is desired for a video stabilization system implemented on smart phones. However, the present disclosure is not limited to smoothing a shaking raw camera path for video stabilization.

Video stabilization removes undesired motion jitter and reconstructs an original shaking video to a stabilized video that satisfies the cinematographic perception of general viewers. There are two main categories of stabilization techniques, namely, optical image stabilization (OIS) and digital image stabilization (DIS). OIS is usually achieved by mechanically moving a camera lens or sensor based on instantaneous camera movements measured by a gyroscope. Thus, unwanted motions are removed before images are recorded. DIS removes unwanted motions after images are recorded. In DIS, camera motion across multiple frames may be estimated (e.g., an estimated raw path). A smoothed path is then determined based on the estimated raw path using a path optimizer. Through an image warping process, a video may be corrected as if a camera that recorded the video was moving along a smoothed path. The present disclosure may be applied to DIS, but the present disclosure is not limited thereto.

In an embodiment, there are two parts, i.e., an extended full tableau simplex based LP solver for solving a path smoothing problem using an L1 norm cost function, and an ADMM based QP solver for solving a path smoothing problem using an L2 norm cost function. The L1 norm based path smoothing problem may be converted into a standard LP equation. In an embodiment, a dual equation of the standard LP equation is considered, and an extended full tabular realization of the simplex method is provided, which may be seamlessly applied with a warm-start method to achieve significant complexity reduction. The L2 norm based path optimization problem may be transformed into a QP problem with box constraints through dual analysis. By utilizing the special structure of the QP problem, an ADMM based method is provided, which includes a closed-form update in each iteration. Hence, the ADMM based QP solver is more efficient than alternative solutions.

An extended full tableau based simplex method reduces computational complexity and improves numerical stability. A low complexity LP solver solves an L1 norm based path smoothing problem in the dual domain using an extended full tabular simplex method with warm-start. An ADMM based method solves a QP problem with box constraint, which only uses closed-form updates in iterations. A low complexity QP solver solves an L2 norm based path smoothing problem using an ADMM based iterative method with warm-start.

An extended simplex based LP solver for L1 norm based path smoothing provides advantages. For example, an LP formulation derived from a dual domain is more suitable to work with a warm-start method for speeding up convergence. The extended full tabular based simplex method further simplify the computation in each iteration and improves numerical stability.

An ADMM based QP solver for L2 norm based path smoothing provides advantages. For example, a QP problem derived from the dual domain minimizes the number of variables to be optimized. The ADMM based iterative equation simplifies the update in each iteration to a closed-form calculation. By utilizing a warm-start method for convergence speed up, the ADMM based QP solver is more efficient than conventional QP solvers.

Solvers using a camera path smoothing equation in video stabilization are described below. However, the solvers may be applied to a more general optimization problem taking similar forms.

A camera path smoothing problem may be formulated as minimizing the cost function in Equation (1) in each frame:

J(y)=w ₀ d(y,z)+w ₁ ∥D ₁ y∥ ₁ ¹ +w ₂ ∥D ₂ y∥ ₁ ¹ +w ₃ ∥D ₃ y∥ ₁ ¹,  (1)

where z is a raw camera path input and y is a smoothed camera path to be optimized. The D_(i) matrices are differential matrices of different orders as in Equations (2), (3) and (4):

$\begin{matrix} {{D_{1} = \begin{bmatrix} 1 & {- 1} & \; & \; \\ \; & 1 & {- 1} & \; \\ \; & \; & \ddots & \; \\ \; & \; & 1 & {- 1} \end{bmatrix}},} & (2) \\ {{D_{2} = \begin{bmatrix} 1 & {- 2} & 1 & \; & \; \\ \; & 1 & {- 2} & 1 & \; \\ \; & \; & \ddots & \ddots & \; \\ \; & \; & 1 & {- 2} & 1 \end{bmatrix}},} & (3) \\ {D_{3} = {\begin{bmatrix} 1 & {- 3} & 3 & 1 & \; & \; \\ \; & 1 & {- 3} & 3 & 1 & \; \\ \; & \; & \ddots & \ddots & \ddots & \; \\ \; & \; & 1 & {- 3} & 3 & 1 \end{bmatrix}.}} & (4) \end{matrix}$

The three orders of derivatives are sufficient to capture the dynamics of a camera. For other applications, a different number of orders may be selectively determined with modification. The d(y, z) term represents a distance between a raw camera path and a stabilized camera path. In an embodiment, both an L1 distance ∥y−z∥₁ ¹ and an L2 distance ∥y−z∥₂ ² are considered. In each video frame, there may be one input vector z for each dimension of the raw camera path. For example, if the raw camera path models 3D rotation of a camera, three path optimization equations are solved independently for each dimension of the 3D rotation path. The description below concerns a single dimension. An input vector includes path values in previous a₁ frame, a current frame, and future a₂−1 frames.

The optimization problem is as in Equation (5):

$\begin{matrix} {{\hat{y} = {\underset{{z - r_{th}} \leq y \leq {z + r_{th}}}{\arg \mspace{14mu} \min}{J(y)}}},} & (5) \end{matrix}$

where a threshold vector r_(th) is added to constrain the optimized path within the proximity of the raw camera path. Another consistency constraint may be added to enforce that the previously optimized path cannot be changed in the current update as in Equation (6):

(ŷ ₁ , . . . , ŷ _(k) _(current) ⁻¹)=(ŷ _(pre,1) , . . . , ŷ _(pre,k) _(current) ⁻¹),  (6)

where (ŷ_(pre,1), . . . , ŷ_(pre,k) _(current) ⁻¹) is an estimated result from previous frames.

For an LP problem based on an L1 norm, the optimization problem in Equation (5) above is an LP problem if d(y,z)=∥y−z∥₁ ¹. By introducing slack variables e₀

|y−z|, e₁

|D₁y|, e₂

|D₂y|, and e₃

|D₃y|, where |x| indicates taking an elementwise absolute value of vector x, Equation (5) above may be converted to an LP problem in Equations (7) and (8):

$\begin{matrix} {\mspace{76mu} {{{\min_{\overset{\sim}{y}}{w_{0}1^{T}e_{0}}} + {w_{1}1^{T}e_{1}} + {w_{2}1^{T}e_{2}} + {w_{3}1^{T}e_{3}}},{{{s.t.\mspace{14mu} A^{T}}\overset{\sim}{y}} \leq c},}} & (7) \\ {{{{where}\mspace{14mu} A^{T}} = \begin{bmatrix} {- I} & 0 & 0 & 0 & I \\ {- I} & 0 & 0 & 0 & {- I} \\ 0 & {- I} & 0 & 0 & D_{1} \\ 0 & {- I} & 0 & 0 & {- D_{1}} \\ 0 & 0 & {- I} & 0 & D_{2} \\ 0 & 0 & {- I} & 0 & {- D_{2}} \\ 0 & 0 & 0 & {- I} & D_{3} \\ 0 & 0 & 0 & {- I} & {- D_{3}} \\ 0 & 0 & 0 & 0 & I \\ 0 & 0 & 0 & 0 & {- I} \end{bmatrix}},{c = \begin{bmatrix} z \\ {- z} \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ {z + r_{th}} \\ {{- z} + r_{th}} \end{bmatrix}},{\overset{\sim}{y} = \begin{bmatrix} e_{0} \\ e_{1} \\ e_{2} \\ e_{3} \\ y \end{bmatrix}},} & (8) \end{matrix}$

where I and 0 are an identity matrix and a zero matrix of proper size; and 1 is a vector with all ones. Minimizing each L1 norm term β=|α| is transformed into minimizing β with two inequality constraints −β≤α≤β. Consistency is enforced with previously optimized values in Equation (6) above by removing some columns and rows of A^(T) and updating c using previously optimized values.

A dual problem that is solved by the extended full tableau simplex is described below. Any LP problem may be transformed into a standard form as in Equation (9):

$\begin{matrix} {{\min\limits_{x}\mspace{14mu} {c^{T}x}}{{s.t.\mspace{14mu} {Ax}} = b}{{x \geq 0},}} & (9) \end{matrix}$

whose dual problem may be shown to be Equation (10):

$\begin{matrix} {{\max\limits_{y}\mspace{14mu} {b^{T}y}}{{{{s.t.\mspace{14mu} A^{T}}y} + s} = c}{{s \geq 0},}} & (10) \end{matrix}$

where the dimension of A is m×n, with m≤n in general, i.e., A is a fat matrix. The LP equation may be transformed to either primal or dual forms. However, transformation to the primal form in Equation (9) above requires more slack variables than directly fitting Equation (7) above into the dual domain. Therefore, Equation (7) above may be treated as a dual equation and the corresponding primal problem may be solved. This may be achieved by setting b^(T)=−[w₀1^(T), w₁1^(T), w₂1^(T), w₃1^(T)], y={tilde over (y)} and using the same A^(T) and c from Equation (7) above. According to the duality theorem, the optimal solutions to problems (9) and (10) above will satisfy c^(T)x*=y*^(T)b.

In the present disclosure, an improvement to the simplex algorithm is disclosed that reduces computational complexity and improves numerical stability.

A solution to the primal problem (9) above is the so called basic feasible solution. A solution x* is a basic feasible solution if (a) all equality constraints are active and (b) out of the active constrains, there are n of the active constraints that are linearly independent. A basic feasible solution only has m nonzero elements out of the n values. The nonzero part of a basic feasible solution is Equation (11):

x _(b) =B ⁻¹ b,  (11)

where basis matrix B includes m independent columns of A, i.e., B=[A_(B(1)), . . . , A_(B(m))]. In this case, B(1), . . . , B(m) are the corresponding column indices and A_(B(i)) denotes one column of A that is in the basis of the basic feasible solution. The corresponding basic feasible solution is obtained by adding zeros to the other coordinates that are not in the basis. In each simplex iteration, a column A_(j) of A is sought which is not in B to substitute one of the columns A_(B(l)), which is currently in B. By doing so, a new basis matrix becomes B=[ . . . A_(B(l−1)), A_(j), A_(B(l+1)) . . . ]. The nonzero part of the new basic feasible solution is given by b=B ⁻¹b. The simplex method essentially travels from one extreme point to another extreme point with reduced cost in each iteration. The simplex method stops after there is no entering column that can reduce the cost. y* is the solution to the dual equation, which may be calculated by y*=[B⁻¹]^(T)c_(B) using the matrix B that includes the optimal basis found by the simplex method.

The most computationally intensive part of the simplex method is calculating B⁻¹. In an embodiment, an extended full tableau simplex method is used for a more efficient implementation of the simplex method. That is, a row operation based update is used to realize the simplex update in each iteration by updating the following extended full tableau in Table 1:

TABLE 1 -c_(B) ^(T)B⁻¹b c-c_(B) ^(T)B⁻¹A -c_(B) ^(T)B⁻¹ B⁻¹b B⁻¹A B⁻¹

The extended full tableau in Table 1 above is an extension of the full tableau simplex method and is described below in greater detail.

An iteration starts with an extended full tableau associated with a basis matrix B and a corresponding basic feasible solution x.

The reduced costs c−c_(B) ^(T)B⁻¹A in the 0th row of the extended full tableau is examined. If the reduced costs c−c_(B) ^(T)B⁻¹A are all nonnegative, the current basic feasible solution is optimal, and the method terminates. Otherwise, a j for which c _(j)<0 is chosen.

For the vector u=B⁻¹A_(j), which is a lower middle part of the j+1th column in the tableau, the method terminates if no component of u is positive.

For each i for which u_(i) is positive, the ratio x_(B)=x_(B(i))/u_(i) is computed. l is the index of a row that corresponds to the smallest ratio, where x_(B)=B⁻¹b may be read from a bottom left part of the extended full tableau. The column A_(B(l)) exists in the basis and the column A_(j) enters the basis.

To each row of the tableau a constant multiple of the lth row is added so that u_(l) (e.g., the pivot element) becomes one and all other entries of the pivot column become zero.

Upon termination of the extended full tableau simplex method, the optimal dual solution is obtained through y*=−[−C_(B) ^(T)B⁻¹]^(T), where the −c_(B) ^(T)B⁻¹ term is the top right block of the extended full tableau. In an embodiment of the extended full tableau method, B⁻¹A_(B)=B⁻¹B=I, i.e., there is no need to perform the row operation on the mth column of B⁻¹A, which corresponds to the newly updated basis. Instead, the corresponding part of the block is set as an identity matrix.

A warm-start method may be used to solve for the optimal y* for consecutive frames to speed up convergence. For example, the optimal extended full tableau obtained in the previous frame may be used to initialize the extended full tableau of the current frame. Such a method is valid only if Equation (7) above is fit into the dual domain and the corresponding problem in the primal domain is solved. This is because the primal feasible set given by Ax=b, x≥0 does not change across frames, which guarantees the optimal solution in the previous frame is still a basic feasible solution to the LP of the current frame. Convergence accelerates because c only changes slightly in adjacent frames.

The extended full tableau simplex with warm-start also has improved numerical stability, which is very important when used to solve general path optimization problems. When warm-start is used, B⁻¹ is continuously updated across multiple frames. Hence, a round-off error will propagate from one frame to another. One version of the simplex method, namely, the revised simplex method, will suffer from this error propagation with warm-start. The extended full-tableau is much less sensitive to such error propagation, because, although B⁻¹ is updated in the full tableau, B⁻¹ is not directly used for any matrix multiplication.

FIG. 1 illustrates a block diagram of a gyroscope-based 3D video stabilization system, according to one embodiment. A gyroscope-based 3D video stabilization system 100 includes a 3D rotation estimator 101, a 3D rotation smoother 103, a distortion calculator 105, and a distortion compensator 107.

The 3D rotation estimator 101 includes an input 109 and an output 111. The 3D rotation estimator 101 may receive angular velocities measured by a gyroscope at the input 109 and uses the angular velocities to estimate 3D rotation of a camera and output an accumulated 3D rotation raw camera path at the output 111.

The 3D rotation smoother 103 includes an input connected to the output 111 of the 3D rotation estimator 101 and an output 113. The 3D rotation smoother 103 smooths the 3D raw camera path received from the 3D rotation estimator 101 and outputs the 3D raw camera path and a 3D smoothed camera path at the output 113.

The distortion calculator 105 includes an input connected to the output 113 of the 3D rotation smoother 103 and an output 115 for providing a distorted grid. Using the 3D raw camera path and the 3D smoothed camera path, the distortion calculator 105 determines the distorted grid.

The distortion compensator 107 includes a first input connected to the output 115 of the distortion calculator 105, a second input 117, and an output 119. The distortion compensator 107 receives the distorted grid determined by the distortion calculator 105, receives an image sequence at the second input 117, and uses the distorted grid to compensate for 3D rotation in the image sequence.

FIG. 2 illustrates an apparatus for an L1 path optimizer, according to one embodiment. An extended full tableau simplex based LP solver 200 transforms an L1 trend filtering problem to an LP primal-dual problem pair, which enables the efficient use of an extended full tabular simplex method and warm start technique.

Referring to FIG. 2, the extended full tableau simplex based LP solver 200 includes an L1 controller 201, an L1 CPU 203, and an L1 ALU 205.

The L1 controller 201 includes a first input 207 for receiving a raw data series z to be smoothed, a second input 209 for receiving selected weights w₀, w₁, w₂, and w₃ to control the smoothness of an output path, and an output 211. The L1 controller 201 formulates an L1 trend filtering problem in Equation (12):

$\begin{matrix} {{\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{14mu} {w_{0}{{y - z}}_{1}^{1}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}} & (12) \end{matrix}$

The L1 CPU 203 includes an input connected to the output 211 of the L1 controller 201 and an output 213. The L1 CPU 203 transforms the L1 trend filtering problem in Equation (12) above to primal-dual problem pair.

The L1 ALU 205 includes a first input connected to the output 213 of the L1 CPU 203, an output 215, and a second input connected to the output 215. The L1 ALU 205 solves the primal problem with an extended full tableau simplex method with warm start, where a previous solution to the primal problem is used as the warm start, and outputs a smoothed path y. The operation of the L1 ALU 205 is described below in greater detail with reference to FIG. 4.

FIG. 3 illustrates a flowchart of a method of an extended full tableau simplex based LP solver, according to one embodiment. At 301, the extended full tableau simplex based LP solver, by an L1 controller, receives a raw data series z to be smoothed. At 303, the extended full tableau simplex based LP solver, by the L controller, receives selected weights w₀, w₁, w₂, and w₃ to control the smoothness of an output path. At 305, the extended full tableau simplex based LP solver, by the L1 controller, formulates an L1 trend filtering problem as in Equation (12) above.

At 307, the extended full tableau simplex based LP solver, by an L1 CPU, transforms the L1 trend filtering problem in Equation (12) above to primal-dual problems. At 309, the extended full tableau simplex based LP solver, by an L1 ALU, solves the primal problem with an extended full tabular simplex method with a warm start. At 311, the extended full tableau simplex based LP solver, by the L1 ALU, uses a previous solution (e.g., the solution at 309) to the primal problem as the warm start. At 313, the extended full tableau simplex based LP solver, by the L1 ALU, outputs a smoothed path y.

FIG. 4 illustrates a flowchart of a method of an L1 ALU (e.g., L1 ALU 205 in FIG. 2 and step 309 in FIG. 3), according to an embodiment. At 401, the L1 ALU, updates c using a k^(th) frame input z_(k).

At 403, the L1 ALU determines if k is equal to 0. At 405, the L ALU initializes a full tableau using standard simplex initialization if it is determined that k is equal to 0. At 407, the L1 ALU initializes the full tableau with a warm start (e.g., using the last updated full tableau) if k is determined to not be equal to 0.

At 409, the L1 ALU determines a current full tableau. At 411, the L1 ALU determines if a costc−c_(B) ^(T)B⁻¹A is all non-negative. At 413, the L1 ALU outputs y*=−[−c_(B) ^(T)B⁻¹]^(T) if the cost c−c_(B) ^(T)B⁻¹A is determined to be all non-negative.

At 415, the L1 ALU determines an entering column j with c _(J)<0 if the cost c−c_(B) ^(T)B⁻¹A is not determined to be all non-negative. At 417, the L1 ALU determines if u=B⁻¹A_(j) is non-positive. At 419, the L1 ALU determines an unbounded solution if u=B⁻¹A_(j) is non-positive.

At 421, the L1 ALU determines an exiting column j that gives the smallest x_(B(i))/u_(i) among all positive u_(i) if u=B⁻¹A_(j) is not non-positive. At 423, the L1 ALU performs an elementary row operation and updates the full tableau.

A QP problem based on an L2 norm is described below. The optimization problem in Equation (5) above becomes a QP problem, if d(y, z)=∥y−z∥₂ ² in Equation (13):

$\begin{matrix} {{\min\limits_{y}\mspace{14mu} {w_{0}{{y - z}}_{2}^{2}}} + {\sum\limits_{i = 1}^{3}\; {w_{i}{{D_{1}y}}_{1}^{1}}}} & (13) \end{matrix}$

Equation (13) above may be transformed into a standard QP form. In this case, a dual domain transformation is performed, as the dual domain requires fewer slack variables. First, x_(i)=D_(i)y. Hence, Equation (13) above may be rewritten as Equation (14):

$\begin{matrix} {{{\min\limits_{y,x_{1},x_{2},x_{3}}\mspace{14mu} {w_{0}{{y - z}}_{2}^{2}}} + {w_{1}{x_{1}}_{1}^{1}} + {w_{2}{x_{2}}_{1}^{1}} + {w_{3}{x_{3}}_{1}^{1}}}{{s.t.\mspace{14mu} {- r_{th}}} \leq {y - z} \leq r_{th}}{{x_{i} = {D_{i}y}},{i = 1},2,3}} & (14) \end{matrix}$

The Lagrangian function of Equation (14) above is given by Equation (15):

$\begin{matrix} {{L\left( {y,x,v,\mu} \right)} = {{\left( {y - z} \right)^{T}\left( {y - z} \right)} + {\sum\limits_{i = 1}^{3}\; \left\{ {{w_{i}{x_{i}}_{1}} + {v_{i}^{T}\left( {{D_{i}y} - x_{i}} \right)}} \right\}} + {\mu_{lb}^{T}\left( {z - r_{th} - y} \right)} + {\mu_{ub}^{T}\left( {y - z - r_{th}} \right)}}} & (15) \end{matrix}$

where v=[v₁, v₂, v₃]^(T) are the Lagrange multipliers for x_(i)=D_(i)y, i=1,2,3; and μ_(lb) ^(T), μ_(ub) ^(T) are the Lagrange multipliers for −r_(th)≤y−z≤r_(th). Treating x as the only variable, the solution to Equation (15) above is Equation (16):

$\begin{matrix} {{L\left( {y,x^{*},v,\mu} \right)} = \left\{ \begin{matrix} {{{\left( {y - z} \right)^{T}\left( {y - z} \right)} + {\sum\limits_{i = 1}^{3}\; {v_{i}^{T}D_{i}y}} + {\mu_{lb}^{T}\left( {z - r_{th} - y} \right)} + {\mu_{ub}^{T}\left( {y - z - r_{th}} \right)}},{{{- w_{i}}1} \leq v_{i} \leq {w_{i}1}}} \\ {{- \infty},{{otherwise}.}} \end{matrix} \right.} & (16) \end{matrix}$

Hence, the additional constraint −w_(i)1≤v_(i)≤w_(i)1 is added. Solving for the optimal y in Equation (16) above under the constraint −w_(i)1≤v_(i)≤w_(i)1 results in L(y*,x*,v,μ)=inf_(y)L(y,x*,v,μ). According to the duality theory, the dual equation then become

${\max\limits_{v,\mu}\mspace{11mu} {L\left( {y^{*},x^{*},v,\mu} \right)}},$

which may be derived as Equation (17):

$\begin{matrix} {{{\min_{\eta}{\frac{1}{2}\eta^{T}{AA}^{T}\eta}} - {2\left( {{Az} + B} \right)^{T}\eta}}{{s.t.\mspace{11mu} \gamma_{lb}} \leq \eta \leq {\gamma_{ub}\mspace{14mu} {where}}}{A = \begin{bmatrix} I \\ {- I} \\ D_{1} \\ D_{2} \\ D_{3} \end{bmatrix}},{\eta = \begin{bmatrix} \mu_{ub} \\ \mu_{lb} \\ v_{1} \\ v_{2} \\ v_{3} \end{bmatrix}},{\gamma_{lb} = \begin{bmatrix} 0 \\ 0 \\ {{- w_{1}}1} \\ {{- w_{2}}1} \\ {{- w_{3}}1} \end{bmatrix}},{\gamma_{ub} = {{\begin{bmatrix} \infty \\ \infty \\ {w_{1}1} \\ {w_{2}1} \\ {w_{3}1} \end{bmatrix}\mspace{11mu} B} = {\begin{bmatrix} {{- z} - r_{th}} \\ {z - r_{th}} \\ 0 \\ 0 \\ 0 \end{bmatrix}.}}}} & (17) \end{matrix}$

Once the optimal dual solution η* is obtained, the primal solution may be recovered through Equation (18):

y*=z−½A ^(T)η*  (18)

Equation (18) above is a positive semidefinite QP problem with box constraints. Some methods for solving a QP problem include, e.g., a QP interior point method and a coordinate descent method. In an embodiment, ADMM is used to solve the QP problem in Equation (17) above.

A dual solution based on ADMM is described below. Equation (17) above may be rewritten as Equation (19):

$\begin{matrix} {{{\min\limits_{x}\mspace{11mu} {x^{T}{Hx}}} + {f^{T}x}}{{s.t.\mspace{11mu} \gamma_{lb}} \leq \eta \leq \gamma_{ub}}} & (19) \end{matrix}$

where H=AA^(T), f=2(Az+B), and x=η. An equivalent formulation is Equation (20):

$\begin{matrix} {{{\min\limits_{x}\mspace{11mu} {x^{T}{Hx}}} + {f^{T}x}}{{s.t.\mspace{11mu} x} = y}{\gamma_{lb} \leq y \leq \gamma_{ub}}} & (20) \end{matrix}$

By considering the dual for constraint x=y, the augmented Lagrangian of Equation (20) above is Equation (21):

L(x,y,α)=x ^(T) Hx+f ^(T) x+α ^(T)(x−y)+ρ/2|x−y| ²  (21)

where ρ is a weight on a quadratic penalty. The ADMM based update for solving Equation (21) is given by Equations (22), (23), and (24):

$\begin{matrix} {y_{k + 1} = {\arg \; {\min\limits_{\gamma_{lb} \leq y \leq \gamma_{ub}}\mspace{11mu} {L\left( {x_{k},y,\alpha_{k}} \right)}}}} & (22) \\ {x_{k + 1} = {\arg \; {\min\limits_{x}\mspace{11mu} {L\left( {x,y_{k + 1},\alpha_{k}} \right)}}}} & (23) \\ {\alpha_{k + 1} = {\alpha_{k} + {\rho \left( {x_{k + 1} - y_{k + 1}} \right)}}} & (24) \end{matrix}$

The method terminates if both the primal gap r_(p)=|x_(k)−y_(k)|₂ and the dual gap r_(d)=|ρ(x_(k)−x_(k−1))|₂ is below a predetermined threshold γ.

The x update,

${x_{k + 1} = {\arg \mspace{11mu} {\min\limits_{x}{L\left( {x,y_{k + 1},\alpha_{k}} \right)}}}},$

is an unconstrained QP problem, which may be computed by Equation (25):

x _(k+1)=[2H+ρI]⁻¹(ρy _(k+1)−α_(k) −f)  (25)

Since a fixed ρ is used, the matrix inversion [2H+ρI]⁻¹ may be calculated just once and reused for all iterations across all frames. The y update is essentially finding the minimum distance to the point

$x_{k} + {\frac{1}{\rho}\alpha_{k}}$

under the box constraint γ_(lb)≤y≤γ_(ub), which also has the following closed-form solution in Equation (26):

$\begin{matrix} {y_{k + 1} = \left\lbrack {x_{k} + {\frac{1}{\rho}\alpha_{k}}} \right\rbrack_{\gamma_{lb}}^{\gamma_{ub}}} & (26) \end{matrix}$

The ADMM based QP solver may also work with a warm-start by setting x₀ to an optimal solution in a previous frame. Due to a closed-form update with low complexity, the method runs much faster than conventional methods.

FIG. 5 illustrates a L2 path optimizer, according to one embodiment. An ADMM QP solver 500 includes an L2 controller 501, an L2 CPU 503, and an L2 ALU 505.

The L2 controller 501 includes a first input 507 for receiving a raw data series z to be smoothed, a second input 509 for receiving selected weights w₀, w₁, w₂, and w₃ to control the smoothness of an output path, and an output 511. The L2 controller 501 formulates an L2 trend filtering problem in Equation (27):

$\begin{matrix} {{\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{11mu} {w_{0}{{y - z}}_{2}^{2}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}} & (27) \end{matrix}$

The L2 CPU 503 includes an input connected to the output 511 of the L2 controller 501 and an output 513. The L2 CPU 503 derives a QP problem through dual transformation.

The L2 ALU 505 includes a first input connected to the output 513 of the L2 CPU 503, an output 515, and a second input connected to the output 515. The L2 ALU 505 solves the QP problem using an ADMM based solution with closed-form updates with a warm start, where a previous solution of the ADMM based solution with closed-form updates is used as the warm start, and outputs a smoothed path y. The operation of the L2 ALU 505 is described below in greater detail with reference to FIG. 7.

FIG. 6 illustrates a flowchart of a method of an ADMM based QP solver, according to one embodiment. At 601, the ADMM based QP solver, by an L2 controller, receives a raw data series z to be smoothed. At 603, the ADMM based QP solver, by the L2 controller, receives selected weights w₀, w₁, w₂, and w₃ to control the smoothness of an output path. At 605, the ADMM based QP solver, by the L2 controller, formulates an L2 trend filtering problem as in Equation (27) above.

At 607, the ADMM based QP solver, by an L2 CPU, derives a QP problem through dual transformation. At 609, the ADMM based QP solver, by an L2 ALU, solves the QP problem using an ADMM based solution with closed-form updates. At 611, the ADMM based QP solver, by the L2 ALU, uses a previous solution to the QP problem as a warm start. At 613, the ADMM based QP solver, by the L2 ALU, outputs a smoothed path y.

L1 trend filtering is different from L2 trend filtering. The choice of which one to use is subject to application requirements, as the different choices of the distance penalty term will change the property in the output smoothed path.

The LP solver and the QP solver can take different numbers of derivative terms in Equation (1) above. The ADMM based QP solver can also process derivative terms with an L2 norm. The LP solver and the QP solver may be generalized to solve filtering problems considering higher order terms.

FIG. 7 illustrates a flowchart of a method of an L2 ALU (e.g., L2 ALU 505 in FIG. 5 and step 609 in FIG. 6), according to an embodiment. At 701, the L2 ALU, updates f using an n^(th) frame input z_(n).

At 703, the L2 ALU determines if n is equal to 0. At 705, the L2 ALU randomly initializes a variable x₀ and a Lagrange multiplier α₀. and sets an iteration number k equal to 0 if n is equal to 0. At 707, the L2 ALU initializes x₀ and α₀ using the last update from a previous frame n−1 and sets the iteration number k equal to 0 if n is not equal to 0.

At 709, the L2 ALU determines an ADMM based update according to Equations (28), (29), and (30):

$\begin{matrix} {x_{k + 1} = {\left\lbrack {{2H} + {\rho \; I}} \right\rbrack^{- 1}\left( {{\rho \; y_{k + 1}} - \alpha_{k} - f} \right)}} & (28) \\ {y_{k + 1} = \left\lbrack {x_{k} + {\frac{1}{\rho}\alpha_{k}}} \right\rbrack_{\gamma_{lb}}^{\gamma_{ub}}} & (29) \\ {\alpha_{k + 1} = {\alpha_{k} + {\rho \left( {x_{k + 1} - y_{k + 1}} \right)}}} & (30) \end{matrix}$

At 711, the L2 ALU calculates a residual gap according to Equations (31) and (32):

r _(p) =|x _(k) −y _(k)|₂  (31)

r _(d)=|ρ(x _(k) −x _(k−1))|₂  (32)

At 713, the L2 ALU determines if r_(p)<y and r_(d)<y. At 715, the L2 ALU sets the iteration number k to k+1 if it is not true that r_(p)<y and r_(d)<y. At 717, the L2 ALU outputs z_(n)−½A^(T)x_(k) if r_(p)<y and r_(d)<y.

FIG. 8 illustrates a block diagram of an electronic device in a network environment, according to one embodiment. An electronic device 801 in a network environment 800 may communicate with an electronic device 802 via a first network 898 (e.g., a short-range wireless communication network), or an electronic device 804 or a server 808 via a second network 899 (e.g., a long-range wireless communication network). According to one embodiment, the electronic device 801 may communicate with the electronic device 804 via the server 808. The electronic device 801 may include a processor 820, a memory 830, an input device 850, a sound output device 855, a display device 860, an audio module 870, a sensor module 876, an interface 877, a haptic module 879, a camera module 880, a power management module 888, a battery 889, a communication module 890, a subscriber identification module (SIM) 896, or an antenna module 897. In one embodiment, at least one (e.g., the display device 860 or the camera module 880) of the components may be omitted from the electronic device 801, or one or more other components may be added to the electronic device 801. In one embodiment, some of the components may be implemented as a single integrated circuit (IC). For example, the sensor module 876 (e.g., a fingerprint sensor, an iris sensor, or an illuminance sensor) may be embedded in the display device 860 (e.g., a display).

The processor 820 may execute, for example, software (e.g., a program 840) to control at least one other component (e.g., a hardware or a software component) of the electronic device 801 coupled with the processor 820, and may perform various data processing or computations. According to one embodiment, as at least part of the data processing or computations, the processor 820 may load a command or data received from another component (e.g., the sensor module 876 or the communication module 890) in volatile memory 832, process the command or the data stored in the volatile memory 832, and store resulting data in non-volatile memory 834. According to one embodiment, the processor 820 may include a main processor 821 (e.g., a CPU or an application processor (AP)), and an auxiliary processor 823 (e.g., a graphics processing unit (GPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that is operable independently from, or in conjunction with, the main processor 821. Additionally or alternatively, the auxiliary processor 823 may be adapted to consume less power than the main processor 821, or execute a particular function. The auxiliary processor 823 may be implemented as being separate from, or a part of, the main processor 821.

The auxiliary processor 823 may control at least some of the functions or states related to at least one component (e.g., the display device 860, the sensor module 876, or the communication module 890) among the components of the electronic device 801, instead of the main processor 821 while the main processor 821 is in an inactive (e.g., sleep) state, or together with the main processor 821 while the main processor 821 is in an active state (e.g., executing an application). According to one embodiment, the auxiliary processor 823 (e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., the camera module 880 or the communication module 890) functionally related to the auxiliary processor 823.

The memory 830 may store various data used by at least one component (e.g., the processor 820 or the sensor module 876) of the electronic device 801. The various data may include, for example, software (e.g., the program 840) and input data or output data for a command related thereto. The memory 830 may include the volatile memory 832 or the non-volatile memory 834.

The program 840 may be stored in the memory 830 as software, and may include, for example, an operating system (OS) 842, middleware 844, or an application 846.

The input device 850 may receive a command or data to be used by another component (e.g., the processor 820) of the electronic device 801, from the outside (e.g., a user) of the electronic device 801. The input device 850 may include, for example, a microphone, a mouse, or a keyboard.

The sound output device 855 may output sound signals to the outside of the electronic device 801. The sound output device 855 may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as playing multimedia or recording, and the receiver may be used for receiving an incoming call. According to one embodiment, the receiver may be implemented as being separate from, or a part of, the speaker.

The display device 860 may visually provide information to the outside (e.g., a user) of the electronic device 801. The display device 860 may include, for example, a display, a hologram device, or a projector and control circuitry to control a corresponding one of the display, hologram device, and projector. According to one embodiment, the display device 860 may include touch circuitry adapted to detect a touch, or sensor circuitry (e.g., a pressure sensor) adapted to measure the intensity of force incurred by the touch.

The audio module 870 may convert a sound into an electrical signal and vice versa. According to one embodiment, the audio module 870 may obtain the sound via the input device 850, or output the sound via the sound output device 855 or a headphone of an external electronic device (e.g., electronic device 802) directly (e.g., wiredly) or wirelessly coupled with the electronic device 801.

The sensor module 876 may detect an operational state (e.g., power or temperature) of the electronic device 801 or an environmental state (e.g., a state of a user) external to the electronic device 801, and then generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module 876 may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

The interface 877 may support one or more specified protocols to be used for the electronic device 801 to be coupled with the external electronic device (e.g., the electronic device 802) directly (e.g., wiredly) or wirelessly. According to one embodiment, the interface 877 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

A connecting terminal 878 may include a connector via which the electronic device 801 may be physically connected with the external electronic device (e.g., the electronic device 802). According to one embodiment, the connecting terminal 878 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

The haptic module 879 may convert an electrical signal into a mechanical stimulus (e.g., a vibration or a movement) or an electrical stimulus which may be recognized by a user via tactile sensation or kinesthetic sensation. According to one embodiment, the haptic module 879 may include, for example, a motor, a piezoelectric element, or an electrical stimulator.

The camera module 880 may capture a still image or moving images. According to one embodiment, the camera module 880 may include one or more lenses, image sensors, image signal processors, or flashes.

The power management module 888 may manage power supplied to the electronic device 801. According to one embodiment, the power management module 888 may be implemented as at least part of, for example, a power management integrated circuit (PMIC).

The battery 889 may supply power to at least one component of the electronic device 801. According to one embodiment, the battery 889 may include, for example, a primary cell which is not rechargeable, a secondary cell which is rechargeable, or a fuel cell.

The communication module 890 may support establishing a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 801 and the external electronic device (e.g., the electronic device 802, the electronic device 804, or the server 808) and performing communication via the established communication channel. The communication module 890 may include one or more communication processors that are operable independently from the processor 820 (e.g., the AP) and supports a direct (e.g., wired) communication or a wireless communication. According to one embodiment, the communication module 890 may include a wireless communication module 892 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 894 (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate with the external electronic device via the first network 898 (e.g., a short-range communication network, such as Bluetooth™, wireless-fidelity (Wi-Fi) direct, or a standard of the Infrared Data Association (IrDA)) or the second network 899 (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., LAN or wide area network (WAN))). These various types of communication modules may be implemented as a single component (e.g., a single IC), or may be implemented as multiple components (e.g., multiple ICs) that are separate from each other. The wireless communication module 892 may identify and authenticate the electronic device 801 in a communication network, such as the first network 898 or the second network 899, using subscriber information (e.g., international mobile subscriber identity (IMSI)) stored in the subscriber identification module 896.

The antenna module 897 may transmit or receive a signal or power to or from the outside (e.g., the external electronic device) of the electronic device 801. According to one embodiment, the antenna module 897 may include one or more antennas, and, therefrom, at least one antenna appropriate for a communication scheme used in the communication network, such as the first network 898 or the second network 899, may be selected, for example, by the communication module 890 (e.g., the wireless communication module 892). The signal or the power may then be transmitted or received between the communication module 890 and the external electronic device via the selected at least one antenna.

At least some of the above-described components may be mutually coupled and communicate signals (e.g., commands or data) therebetween via an inter-peripheral communication scheme (e.g., a bus, a general purpose input and output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)).

According to one embodiment, commands or data may be transmitted or received between the electronic device 801 and the external electronic device 804 via the server 808 coupled with the second network 899. Each of the electronic devices 802 and 804 may be a device of a same type as, or a different type, from the electronic device 801. According to one embodiment, all or some of operations to be executed at the electronic device 801 may be executed at one or more of the external electronic devices 802, 804, or 808. For example, if the electronic device 801 should perform a function or a service automatically, or in response to a request from a user or another device, the electronic device 801, instead of, or in addition to, executing the function or the service, may request the one or more external electronic devices to perform at least part of the function or the service. The one or more external electronic devices receiving the request may perform the at least part of the function or the service requested, or an additional function or an additional service related to the request, and transfer an outcome of the performing to the electronic device 801. The electronic device 801 may provide the outcome, with or without further processing of the outcome, as at least part of a reply to the request. To that end, a cloud computing, distributed computing, or client-server computing technology may be used, for example.

One embodiment may be implemented as software (e.g., the program 840) including one or more instructions that are stored in a storage medium (e.g., internal memory 836 or external memory 838) that is readable by a machine (e.g., the electronic device 801). For example, a processor (e.g., the processor 820) of the machine (e.g., the electronic device 801) may invoke at least one of the one or more instructions stored in the storage medium, and execute it, with or without using one or more other components under the control of the processor. Thus, a machine may be operated to perform at least one function according to the at least one instruction invoked. The one or more instructions may include code generated by a complier or code executable by an interpreter. A machine-readable storage medium may be provided in the form of a non-transitory storage medium. The term “non-transitory” indicates that the storage medium is a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

FIG. 9 illustrates a block diagram of a camera module, according to one embodiment. A camera module 1000 may include a lens assembly 1010, a flash 1020, an image sensor 1030, an image stabilizer 1040, a memory 1050 (e.g., a buffer memory), or an image signal processor 1060. The lens assembly 1010 may collect light emitted or reflected from an object whose image is to be taken. The lens assembly 1010 may include one or more lenses. According to one embodiment, the camera module 1000 may include a plurality of lens assemblies 1010. In this case, the camera module 1000 may form, for example, a dual camera, a 360-degree camera, or a spherical camera. Some of the plurality of lens assemblies 1010 may have the same lens attribute (e.g., view angle, focal length, auto-focusing, f number, or optical zoom), or at least one lens assembly may have one or more lens attributes that are different from those of another lens assembly. The lens assembly 1010 may include, for example, a wide-angle lens or a telephoto lens.

The flash 1020 may emit light that is used to reinforce light reflected from an object. According to one embodiment, the flash 1020 may include one or more light emitting diodes (LEDs) (e.g., a red-green-blue (RGB) LED, a white LED, an infrared (IR) LED, or an ultraviolet (UV) LED) or a xenon lamp. The image sensor 1030 may obtain an image corresponding to an object by converting light emitted or reflected from the object and transmitted via the lens assembly 1010 into an electrical signal. According to one embodiment, the image sensor 1030 may be selected from image sensors having different attributes, such as an RGB sensor, a black-and-white (BW) sensor, an IR sensor, or a UV sensor, a plurality of image sensors having the same attribute, or a plurality of image sensors having different attributes. Each image sensor included in the image sensor 1030 may be implemented using, for example, a charged coupled device (CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor.

The image stabilizer 1040 may move the image sensor 1030 or at least one lens included in the lens assembly 1010 in a particular direction, or control an operational attribute (e.g., adjust the read-out timing) of the image sensor 1030 in response to the movement of the camera module 1000 or the electronic device 801 including the camera module 1000. This allows compensating for at least part of a negative effect (e.g., image blurring) by the movement on an image being captured. According to one embodiment, the image stabilizer 1040 may sense such a movement by the camera module 1000 or the electronic device 801 using a gyro sensor or an acceleration sensor disposed inside or outside the camera module 1000. According to one embodiment, the image stabilizer 1040 may be implemented, for example, as an optical image stabilizer.

The memory 1050 may store, at least temporarily, at least part of an image obtained via the image sensor 1030 for a subsequent image processing task. For example, if image capturing is delayed due to shutter lag or multiple images are quickly captured, a raw image obtained (e.g., a Bayer-patterned image, a high-resolution image) may be stored in the memory 1050, and its corresponding copy image (e.g., a low-resolution image) may be previewed via the display device 860. Thereafter, if a specified condition is met (e.g., by a user's input or system command), at least part of the raw image stored in the memory 1050 may be obtained and processed, for example, by the image signal processor 1060. According to one embodiment, the memory 1050 may be configured as at least part of the memory 830 or as a separate memory that is operated independently from the memory 830.

The image signal processor 1060 may perform one or more image processing with respect to an image obtained via the image sensor 1030 or an image stored in the memory 1050. The one or more image processing may include, for example, depth map generation, 3D modeling, panorama generation, feature point extraction, image synthesizing, or image compensation (e.g., noise reduction, resolution adjustment, brightness adjustment, blurring, sharpening, or softening). Additionally or alternatively, the image signal processor 1060 may perform control (e.g., exposure time control or read-out timing control) with respect to at least one (e.g., the image sensor 1030) of the components included in the camera module 880. An image processed by the image signal processor 1060 may be stored in the memory 1050 for further processing, or may be provided to an external component (e.g., the memory 830, the display device 860, the electronic device 802, the electronic device 804, or the server 808) outside the camera module 1000. According to one embodiment, the image signal processor 1060 may be configured as at least part of the processor 820, or as a separate processor that is operated independently from the processor 820. If the image signal processor 1060 is configured as a separate processor from the processor 820, at least one image processed by the image signal processor 1060 may be displayed, by the processor 820, via the display device 860 as it is or after being further processed.

According to one embodiment, the electronic device 801 may include a plurality of camera modules 880 having different attributes or functions. In this case, at least one of the plurality of camera modules 880 may form, for example, a wide-angle camera and at least another of the plurality of camera modules 880 may form a telephoto camera. Similarly, at least one of the plurality of camera modules 880 may form, for example, a front camera and at least another of the plurality of camera modules 880 may form a rear camera.

Although certain embodiments of the present disclosure have been described in the detailed description of the present disclosure, the present disclosure may be modified in various forms without departing from the scope of the present disclosure. Thus, the scope of the present disclosure shall not be determined merely based on the described embodiments, but rather determined based on the accompanying claims and equivalents thereto. 

What is claimed is:
 1. An apparatus, comprising: an L1 central processing unit (CPU) configured to transform an L trend filtering problem to a primal-dual linear programming (LP) optimization problem pair; and an L1 arithmetic logic unit (ALU) connected to the L1 CPU and configured to solve a primal problem of the primal-dual LP optimization problem pair.
 2. The apparatus of claim 1, wherein the L1 ALU is further configured to use a previous solution of the primal-dual LP optimization problem pair as a warm start.
 3. The apparatus of claim 1, wherein the L1 trend filtering problem is formulated as: ${\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{11mu} {w_{0}{{y - z}}_{1}^{1}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}$ where z is a raw data series, w₀, w₁, w₂, and w₃ are weights, y is a smoothed output path, D_(i) is an i^(th) order differential matrix, and r_(th) is a threshold vector.
 4. The apparatus of claim 1, wherein the L1 ALU is further configured to solve the primal problem of the primal-dual LP optimization problem pair as follows: -c_(B) ^(T)B⁻¹b c-c_(B) ^(T)B⁻¹A -c_(B) ^(T)B⁻¹ B⁻¹b B⁻¹A B⁻¹

where A is a fat matrix, c is a column matrix, B is a basis matrix, T indicates a transposition of a matrix, and b=Ax, and x is a vector.
 5. The apparatus of claim 1, wherein the L1 ALU is further configured to solve the primal problem of the primal-dual LP optimization problem pair by updating c using a k^(th) frame input z_(k), where z is a raw data series and k is an integer, determining if k is equal to 0, initializes a method using simplex initialization if it is determined that k is equal to 0, initializing the method with a warm start of a last update of the method if k is determined to not be equal to 0, determining a current method, determining if a cost c−c_(B) ^(T)B⁻¹A is all non-negative, outputting y*=−[−c_(B) ^(T)B⁻¹]^(T) if the cost c−c_(B) ^(T)B⁻¹A is determined to be all non-negative, determining an entering column j with c _(J)<0 if the cost c−c_(B) ^(T)B⁻¹A is not determined to be all non-negative, determining if u=B⁻¹A_(j) is non-positive, determining an unbounded solution if u=B⁻¹A_(j) is non-positive, determining an exiting column j that gives a smallest x_(B(i))/u_(i) among all positive u_(i) if u=B⁻¹A_(j) is not non-positive, and performing an elementary row operation and updating the method.
 6. A method, comprising: transforming, by an L1 central processing unit (CPU), an L1 trend filtering problem to a primal-dual linear programming (LP) optimization problem pair; and solving, by an L1 arithmetic logic unit (ALU) connected to the L1 CPU, a primal problem of the primal-dual LP optimization problem pair.
 7. The method of claim 6, further comprising using, by the L1 ALU, a previous solution of the primal problem as a warm start.
 8. The method of claim 6, further comprising formulating the L1 trend filtering problem as: ${\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{11mu} {w_{0}{{y - z}}_{1}^{1}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}$ where z is a raw data series to be smoothed, w₀, w₁, w₂, and w₃ are weights, y is the smoothed output path, D_(i) is an i^(th) order differential matrix, and r_(th) is a threshold vector.
 9. The method of claim 6, wherein solving, by the L1 ALU connected to the L1 CPU, the primal problem of the primal-dual LP optimization problem pair includes a method as follows: -c_(B) ^(T)B⁻¹b c-c_(B) ^(T)B⁻¹A -c_(B) ^(T)B⁻¹ B⁻¹b B⁻¹A B⁻¹

where A is a fat matrix, c is a column matrix, B is a basis matrix, T indicates a transposition of a matrix, and b=Ax, and x is a vector.
 10. The method of claim 6, wherein solving, by the L1 ALU connected to the L1 CPU, the primal problem of the primal-dual problems is comprised of: updating c using a k^(th) frame input z_(k), where z is a raw data series to be smoothed and k is an integer; determining if k is equal to 0, initializes a method using simplex initialization if it is determined that k is equal to 0; initializing the method with a warm start of a last update of the method if k is determined to not be equal to 0; determining a current method; determining if a cost c−c_(B) ^(T)B⁻¹A is all non-negative, outputting y⁺=−[−c_(B) ^(T)B⁻¹]^(T) if the cost c−c−c_(B) ^(T)B⁻¹A is determined to be all non-negative; determining an entering column j with c _(J)<0 if the cost c−c_(B) ^(T)B⁻¹A is not determined to be all non-negative; determining if u=B⁻¹A_(j) is non-positive; determining an unbounded solution if u=B⁻¹A_(j) is non-positive; determining an exiting column j that gives a smallest x_(B(t))/u_(i) among all positive u_(i) if u=B⁻¹A_(j) is not non-positive; and performing an elementary row operation and updating the method.
 11. An apparatus, comprising: an L2 central processing unit (CPU) configured to derive a quadratic programming (QP) problem through dual transformation; and an L2 arithmetic logic unit (ALU) connected to the L2 CPU and configured to solve the QP problem using an alternating direction method of multipliers (ADMM) based solution.
 12. The apparatus of claim 11, wherein the L2 ALU is further configured to use a previous solution of the ADMM based solution as a warm start.
 13. The apparatus of claim 11, further comprising an L2 controller configured to formulate an L2 trend filtering problem as: ${\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{11mu} {w_{0}{{y - z}}_{2}^{2}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}$ where z is a raw data series, w₀, w₁, w₂, and w₃ are weights, y is the smoothed output path, D_(i) is an i^(th) order differential matrix, and r_(th) is a threshold vector.
 14. The apparatus of claim 11, wherein the L2 ALU is further configured to derive the quadratic programming (QP) problem through dual transformation.
 15. The apparatus of claim 11, wherein the L2 ALU is further configured to solve the QP problem using the ADMM based solution by updating f using an n^(th) frame input z_(n), where z is a raw data series, determining if n is equal to 0, randomly initializing a variable x₀ and a Lagrange multiplier α₀, and setting an iteration number k equal to 0 if n is equal to 0, initializing x₀ and α₀ using a last update from a previous frame n−1 and setting the iteration number k equal to 0 if n is not equal to 0, determining an ADMM based update according to: x_(k + 1) = [2H + ρ I]⁻¹(ρ y_(k + 1) − α_(k) − f) $y_{k + 1} = \left\lbrack {x_{k} + {\frac{1}{\rho}\alpha_{k}}} \right\rbrack_{\gamma_{lb}}^{\gamma_{ub}}$ α_(k + 1) = α_(k) + ρ(x_(k + 1) − y_(k + 1)) calculating a residual gap according to: r _(p) =|x _(k) −y _(k)|₂ r _(d)=|ρ(x _(k) −x _(k−1))|₂ determining if r_(p)<y and r_(d)<y, setting the iteration number k to k+1 if it is not true that r_(p)<y and r_(d)<y, and outputting z_(n)−½A^(T)x_(k) if r_(p)<y and r_(d)<y, where f=2(Az+B), H=AA^(T), A is a fat matrix, T is a transposition, is a B basis matrix, n is an integer, k is an integer, z is a raw data series, ρ is a weight on a quadratic penalty, γ_(lb) is a lower bound threshold, and γ_(ub) is an upper bound threshold.
 16. A method, comprising: deriving, by an L2 central processing unit (CPU), a quadratic programming (QP) problem through dual transformation; and solving, by an L2 arithmetic logic unit (ALU) connected to the L2 CPU, the QP problem using an alternating direction method of multipliers (ADMM) based solution.
 17. The method of claim 16, further comprising, using, by the L2 ALU, a previous solution of the ADMM based solution as a warm start.
 18. The method of claim 16, further comprising formulating an L2 trend filtering problem as: ${\min\limits_{{z - r_{th}} \leq y \leq {z + r_{th}}}\mspace{11mu} {w_{0}{{y - z}}_{2}^{2}}} + {w_{1}{{D_{1}y}}_{1}^{1}} + {w_{2}{{D_{2}y}}_{1}^{1}} + {w_{3}{{D_{3}y}}_{1}^{1}}$ where z is a raw data series, w₀, w₁, w₂, and w₃ are weights, y is the smoothed output path, D_(i) is an i^(th) order differential matrix, and r_(th) is a threshold vector.
 19. The method of claim 16, wherein deriving, by the L2 CPU, a quadratic programming (QP) problem through dual transformation.
 20. The method of claim 16, wherein solving, by the L2 ALU connected to the L2 CPU, the QP problem using the ADMM based solution is comprised of: updating f using an n^(th) frame input z_(n), where z is a raw data series, w₀, w₁, w₂, and w₃; determining if n is equal to 0; randomly initializing a variable x₀ and a Lagrange multiplier α₀ and setting an iteration number k equal to 0 if n is equal to 0; initializing x₀ and α₀ using a last update from a previous frame n−1 and setting the iteration number k equal to 0 if n is not equal to 0; determining an ADMM based update according to: x_(k + 1) = [2H + ρ I]⁻¹(ρ y_(k + 1) − α_(k) − f) $y_{k + 1} = \left\lbrack {x_{k} + {\frac{1}{\rho}\alpha_{k}}} \right\rbrack_{\gamma_{lb}}^{\gamma_{ub}}$ α_(k + 1) = α_(k) + ρ(x_(k + 1) − y_(k + 1)) calculating a residual gap according to: r _(p) =|x _(k) −y _(k)|₂ r _(d)=|ρ(x _(k) −x _(k−1))|₂ determining if r_(p)<y and r_(d)<y; setting the iteration number k to k+1 if it is not true that r_(p)<y and r_(d)<y; and outputting z_(n)−½A^(T)x_(k) if r_(p)<y and r_(d)<y, where f=2(Az+B), H=AA^(T), A is a fat matrix, T is a transposition, B is a basis matrix, n is an integer, k is an integer, z is a raw data series, ρ is a weight on a quadratic penalty, γ_(lb) is a lower bound threshold, and γ_(ub) is an upper bound threshold. 